#include <iostream>
using namespace std;
int main()
{
  int A, B;
  cin >> A >> B;
  cout << ((A % 2 != 0)||(B % 2 != 0));
  return 0;
}
